-
-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Pick item (Middle Mouse Click) #418
Conversation
Current progress - general structure is in place but crashes upon middle mouse click because the item stack comes back as none |
After testing i noticed that when you pick a block you already have in your hotbar you get another one, This is not vanilla behaviour. You should check if the player already has the block in this hotbar and when yes just switch to it |
@Snowiiii Thanks this should be fixed now. Missed it because it was only an issue with hotbar slot 0, I forgot an equal sign on the comparison. |
Now everything works great. Big thanks @Bafran for your great work. Keep it up 😉 |
Description
Issue #397
Adding Pick Item (Middle Mouse Click). In survival, searches inventory and brings the item to the appropriate hotbar slot if available. In creative, sets the hotbar slot or grabs the item as appropriate.
Todo is adding pick item from entity. A placeholder was left however I don't believe /spawn and spawn eggs are implemented so I didn't have a way of testing on mobs and left that work as a todo.
Testing
Checklist
Things need to be done before this Pull Request can be merged.
cargo fmt
cargo clippy
cargo test
Documentation
I literally could not get the actual docs to load so these are links to internet archive
Pick Item
Set Creative Mode Slot